/**
 * Creat with IntelliJ IDEA
 * Description:测试向链表(不带傀儡节点)代码
 * User:WZW
 * Date:2021-11-03
 * Time:7:29
 */
public class testDemo {
    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        //myLinkedList.create();
//        myLinkedList.addFirst(12);
//        myLinkedList.addFirst(23);
//        myLinkedList.addFirst(34);
//        myLinkedList.addFirst(45);
//        myLinkedList.addFirst(56);
        myLinkedList.addLast(12);
        myLinkedList.addLast(23);
        myLinkedList.addLast(23);
        myLinkedList.addLast(23);
        myLinkedList.addLast(56);
//        myLinkedList.addIndex(3,12);
        myLinkedList.display();
        System.out.println(myLinkedList.size());
        System.out.println(myLinkedList.contains(12));
        myLinkedList.remove(23);
        myLinkedList.display();
        System.out.println(myLinkedList.size());
        myLinkedList.removeAllKey(23);
        myLinkedList.display();
        System.out.println(myLinkedList.size());
        myLinkedList.clear();
        myLinkedList.display();
        System.out.println(myLinkedList.size());
    }
}
